package it.mbus.bz;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;

public class LogReg extends Activity {
    public static Activity handleToClose;


	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_log_reg);
		final ImageView login = (ImageView) findViewById(R.id.login);
		final ImageView registra = (ImageView) findViewById(R.id.registra);
	    handleToClose = this;


		login.setOnTouchListener(new View.OnTouchListener() {
			public boolean onTouch(View v, MotionEvent event) {
				login.setImageResource(R.drawable.logpres);
				return false;
			}
		});

		login.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				login.setImageResource(R.drawable.lognorm);
				Intent localIntent = new Intent();
				localIntent.setClass(LogReg.this, Login.class);
				LogReg.this.startActivity(localIntent);
				

			}
		});
		
		registra.setOnTouchListener(new View.OnTouchListener() {
			public boolean onTouch(View v, MotionEvent event) {
				registra.setImageResource(R.drawable.regpres);
				return false;
			}
		});

		registra.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				registra.setImageResource(R.drawable.regnorm);
				Intent localIntent = new Intent();
				localIntent.setClass(LogReg.this, Register.class);
				LogReg.this.startActivity(localIntent);
			}
		});


	}

}
